package com.ericsson.enap.modules.ossalarm.task.vgc;

import com.ericsson.common.quartz.task.ManualTask;
import com.ericsson.common.util.LogFileName;
import com.ericsson.common.util.LoggerUtils;
import com.ericsson.enap.modules.ossalarm.service.VgcEnmAlarmService;
import com.ericsson.enap.modules.sys.entity.EnipNetelement;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * VGC 采集ENM中符合专家系统配置的告警
 */
@Component
public class VgcEnmAlarmTask implements ManualTask {
    private Logger log = LoggerUtils.Logger(LogFileName.VgcEnmAlarmJob);
    @Autowired
    private VgcEnmAlarmService vgcEnmAlarmService;
    @Override
    public void execute() {
        List<EnipNetelement> netElements=vgcEnmAlarmService.queryNetelementList();
        vgcEnmAlarmService.readAndDealAlarm(netElements,log);
    }
}
